package com.xiaodou.mjf.infrastructure.common.app;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import org.springframework.data.domain.Page;

import com.xiaodou.mjf.infrastructure.common.entity.CommonEntity;

public interface CommonService<T extends CommonEntity,ID extends Serializable> {

	public T save(T entity);
	
	public void save(Collection<T> entities);
	
	public T get(ID id);
	
	public List<T> list();
	
	public void delete(ID id);
	
	public void delete(T entity);
	
	public boolean exits(ID id);

    public Page<T> page(T entity);

    public Integer count(T entity);
}
